package websocket_controller

import (
	"server/internal/library/websocket"
	"server/internal/service"
)

var CMonitor = &cMonitor{}

type cMonitor struct {
}

func (c *cMonitor) MonitorInfo(client *websocket.Client, req *websocket.WsRequest) {
	websocket.SendSuccess(client, req.Event, service.SystemMonitor().MonitorInfo())
}

func (c *cMonitor) HubBaseInfo(client *websocket.Client, req *websocket.WsRequest) {
	websocket.SendSuccess(client, req.Event, websocket.HubBaseInfo())
}

func (c *cMonitor) ProcessInfo(client *websocket.Client, req *websocket.WsRequest) {
	websocket.SendSuccess(client, req.Event, service.SystemMonitor().ProcessInfo())
}
